package com.ssh.action;

import com.opensymphony.xwork2.ActionSupport;
import com.ssh.bean.User;
import com.ssh.service.UserService;

public class UserAction extends ActionSupport {
	private User user;
	private int userId;
	
	public User getUser() {
		return user;
	}
	public void setUser(User user) {
		this.user = user;
	}
	public int getUserId() {
		return userId;
	}
	public void setUserId(int userId) {
		this.userId = userId;
	}
	
	private UserService userService;

	public void setUserService(UserService userService) {
		this.userService = userService;
}
	@Override
	public String execute() throws Exception {
		user =  userService.getUserbyId(userId);
		return "success";
	}
	
}
